import { request } from '../request/request.js'

export function getCouponData() {
  return new Promise((resolve, resject) => {
          request({
                  url: `/discounts/coupons`,
                  method: 'GET',
          }).then(res => {
                  resolve(res)
          })
  })
}


export function addCouponData(obj) {
        return new Promise((resolve, resject) => {
                request({
                        url: `/discounts/fetch?token=${obj.token}&&id=${obj.id}&&pwd=${obj.pwd}`,
                        method: 'POST',
                }).then(res => {
                        resolve(res)
                })
        })
      }

